<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
    <title>审核成员</title>
</head>

<body>
<div class="content">
    <!--
    <div class="page-subcate-list">
        <div class="page-searchbox">
            <div class="pull-right">
                <button onclick="javascript:toVolunteers();"><i class="fa fa-plus" aria-hidden="true" ></i>添加管理员</button>
            </div>
        </div>
    </div>
    -->
    <div class="page-volunteer-recruitment-grid">
        <ul>
            <c:forEach items="${data.content}" var="item">
                <li id="waite_${item.id}">
                    <div class="volunteer-recruitment-card">
                        <div class="volunteer-info">
                            <a href="${ctx}/volunteer/detail/${item.volunteer.memberCode}"><img alt="" class="user-avatar" src="${item.volunteer.headUrl}"></a>
                            <div class="card-title"><a href="#">${item.volunteer.nickName}</a> <i class="fa fa-trophy gold" aria-hidden="true"></i><i class="fa fa-trophy silver" aria-hidden="true"></i><i class="fa fa-trophy bronze" aria-hidden="true"></i></div>
                        </div>
                        <div class="card-body">
                            <div class="card-users"><a href="#"><i class="fa fa-heart" aria-hidden="true"></i>共${item.volunteer.acts}次公益活动，共${item.volunteer.times}分钟公益时间</a></div>
                        </div>
                        <div class="card-footer">
                            <div class="pull-right">
                                <div class="card-delete"><a href="javascript:void(0);" onclick="javascript:verfier('${item.id}','2')">
                                    <!--<i class="fa fa-trash" aria-hidden="true"></i>-->
                                    通过
                                </a></div>
                                <div class="card-delete"><a href="javascript:void(0);" onclick="javascript:verfier('${item.id}','-1')">
                                    <!--<i class="fa fa-trash" aria-hidden="true"></i>-->
                                    拒绝
                                </a></div>
                            </div>
                        </div>
                    </div>
                </li>
            </c:forEach>
        </ul>
    </div>
</div>
<script>
    function verfier(id,status)
    {
        var url = "${ctx}/groupVolunteer/verfier";
        $.post(url, {"id":id,"status": status}, function (result) {
                alert(result.message);
                if(result.code ==0)
                    $('#waite_'+id).remove();
        }, "json");
    }
</script>
</body>
</html>
